package com.dragon.mmochat.message;

import com.dragon.mmochat.MmochatConstant;
import com.skymobi.buffer.SkymobiBuffer;
import com.skymobi.message.SkymobiProtocolMessage;

public class Mmochat_14_12S extends SkymobiProtocolMessage {
	int hallState;
	String errMsg;

	public Mmochat_14_12S(int hallState, String errMsg) {
		setMsgCode(MmochatConstant.MSGCODE_MMOCHAT_S_14_12);
		this.hallState = hallState;
		this.errMsg = errMsg;
	}

	@Override
	protected void encodeBody(SkymobiBuffer out) {
		out.putUnsignedShort(hallState);
		out.putPrefixedString(errMsg, 2);
	}

}
